<?php
require APPPATH.'/libraries/REST_Controller.php';
class  AsbtractRestController extends REST_Controller {
	
	protected $email = NULL;
	
	public function __construct() {
		parent::__construct();
		$this->email = $this->session->userdata("email");
	}
	
	protected function checkUserAuth() {
		if ($this->email == NULL) {
			$array_resp = array();
		    MessagingHelper::AddToError($array_resp,ErrorMessgaes::$USER_AUTH_CODE,ErrorMessgaes::$USER_NOT_AUTH_MSG);
			return $array_resp;
		}
	}
	
	protected function constructErrorMsg($error_code,$error_msg) {
		return array('error' => array('error_code' => $error_code,'error_msg' =>  $error_msg));
	}
	
		
}